﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="User_Profile.aspx.cs" Inherits="User_Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
            <asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="LastName" />
            <asp:BoundField DataField="FirstName" HeaderText="First Name" SortExpression="FirstName" />
            <asp:ImageField DataImageUrlField="Picture">
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" SelectCommand="SELECT [ID], [LastName], [FirstName], [Picture], [TravellerName] FROM [Profile] WHERE ([TravellerName] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="TravellerName" QueryStringField="TravellerName" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:Button ID="btnEditProfile" runat="server" PostBackUrl="~/editProfile.aspx" Text="Edit Profile" />
</asp:Content>

